package com.ampaiva.organizescreen.activity;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;

import com.ampaiva.organizescreen.model.Arrow;

public class ArrowDrawer {
	Paint paint = new Paint();

	public ArrowDrawer() {
		paint.setColor(Color.GREEN);
	}

	public void draw(Canvas canvas, Arrow arrow) {
		canvas.drawCircle(arrow.getStart().x, arrow.getStart().y, 3, paint);
		canvas.drawLine(arrow.getStart().x, arrow.getStart().y, arrow.getEnd().x, arrow.getEnd().y, paint);
		canvas.drawLine(arrow.getEnd().x - 3, arrow.getEnd().y - 3, arrow.getEnd().x, arrow.getEnd().y, paint);
		canvas.drawLine(arrow.getEnd().x - 3, arrow.getEnd().y + 3, arrow.getEnd().x, arrow.getEnd().y, paint);
		canvas.drawLine(arrow.getEnd().x - 3, arrow.getEnd().y - 3, arrow.getEnd().x - 3, arrow.getEnd().y + 3, paint);
	}
}
